﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UofCASE.AgileProductLinerDSL.Nant.Tasks.Models;

namespace APLDTests.NantTests.Mocks
{
    class SameObjectKey : ITestKey
    {
        Object o;

        public SameObjectKey(Object obj)
        {
            o = obj;
        }

        public bool Matches(ITest test)
        {
            return o == test;
        }

        public string TestName
        {
            get { return o.ToString(); }
        }

        public override int GetHashCode()
        {
            return o.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            SameObjectKey other = obj as SameObjectKey;
            return other != null && o.Equals(other.o);
        }
    }
}
